﻿<%@ Page Title="" Language="C#" MasterPageFile="~/forumMaster.Master" AutoEventWireup="true" CodeBehind="AdminAddForum.aspx.cs" Inherits="forum.AdminAddForum" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 <script type="text/javascript">
     function ValidateList () {

         IsValid = false;
         var n = $("#chkbxlstAddSubForumModerators input:checked").length;

         if (n > 0) {
             
             IsValid = true;
             return IsValid;
         }
         alert("Choose at least one user");
         return IsValid;

     }
   </script>

   <style type="text/css">
       
       #chooseModeratots
       {
           margin-top:10px;
       }
       #chooseSpan
       {
          font-size:16px;
          color:blue;
          text-decoration:underline;
       }
       #plModerators
       {
            margin-top:10px;   
       }

       
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3>Add new forum</h3>
    <div id="forumName">
             <asp:Label ID="lblNewForumName" runat="server" Text=""></asp:Label>
    </div>
    <div id="chooseModeratots">
             <span id="chooseSpan">Pleae choose moderators:</span>
    </div>


    <asp:Panel ID="plModerators"  runat="server" ClientIDMode="Static">
    <asp:CheckBoxList ID="chkbxlstAddSubForumModerators" ClientIDMode="Static" runat="server"> </asp:CheckBoxList>
    </asp:Panel>
    <asp:Button ID="btnUpdate" runat="server" Text="Add Forum"  OnClick="btnUpdate_Click" OnClientClick="return ValidateList()" />
    <asp:Button ID="btnCancel" runat="server" Text="Cancel"  OnClick="btnCancel_Click" />
</asp:Content>
